import request from '@/utils/request'

/**
*这是查询
*params username ：登录名  string
  password 密码   string
  aaa   数*/
export function login(username, password, rememberMe) {
  return request({
    url: '/api/authenticate',
    method: 'post',
    data: {
      username,
      password,
      rememberMe
    }
  })
}

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
